<!DOCTYPE html>
<!--HTML5 doctype-->
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=0">
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>新闻资讯 - {site.name}</title>
<link rel="stylesheet" type="text/css" href="<%templateskin%>/jqmobi/css/icons.css" />
<link rel="stylesheet" type="text/css" href="<%templateskin%>/jqmobi/css/af.ui.base.css" />
<link rel="stylesheet" type="text/css" href="<%templateskin%>/css/idangerous.swiper.css" />
<link rel="stylesheet" type="text/css" href="<%templateskin%>/css/style.css" />
<!--jqMobi主JS-->
<script type="text/javascript" charset="utf-8" src="{config.webpath}scripts/jquery/jquery-1.11.2.min.js"></script>
<script type="text/javascript" charset="utf-8" src="<%templateskin%>/jqmobi/jq.appframework.js"></script>
<script type="text/javascript" charset="utf-8" src="<%templateskin%>/jqmobi/ui/appframework.ui.js"></script>
<!--jqMobi插件-->
<script type="text/javascript" charset="utf-8" src="<%templateskin%>/jqmobi/plugins/jq.slidemenu.js"></script>
<script type="text/javascript" charset="utf-8" src="<%templateskin%>/js/idangerous.swiper-2.1.min.js"></script>
<script type="text/javascript" charset="utf-8" src="<%templateskin%>/js/base.js"></script>
<script type="text/javascript">
	$(document).ready(function(){
	  var mySwiper = new Swiper('.swiper-container',{
		calculateHeight:true,
		resizeReInit:true,
		pagination:".pagination",
		autoplay:5000,
		paginationClickable:true
	  });
	});
</script>
</head>

<body>
<div id="afui">
  <div id="content">
    
	<div id="mainPanel" class="panel" data-header="main_header" data-footer="main_footer">
      <!--筛选按钮-->
      <div class="select-bar">
        <div class="col">
          <a href="javascript:;" class="icon-back" onclick="history.back(-1)">返回上一页</a>
        </div>
        <div class="col">
          <a href="#categoryPanel" class="icon-carat-r">资讯类别</a>
        </div>
      </div>
      <!--/筛选按钮-->
      <!--幻灯片-->
      <div id="slider" class="swiper-container">
        <div class="swiper-wrapper">
          <%set DataTable focusNews=get_article_list(channel, 0, 8, "status=0 and is_slide=1")%>
          <%foreach(DataRow dr in focusNews.Rows)%>
          <div class="swiper-slide"><a href="<%linkurl("news_show",{dr[id]})%>" data-ignore="true"><img src="{dr[img_url]}" alt="{dr[title]}" /></a></div>
          <%/foreach%>
        </div>
        <div class="pagination"></div>
      </div>
      <!--/幻灯片-->
      
      <!--最新资讯-->
      <div class="section">
        <h1>最新资讯</h1>
      </div>
      <div>
        <ul class="list listview">
          <%set DataTable newList=get_article_list(channel, 0, 8, "status=0")%>
          <%loop newdr newList%>
          <li>
            <%if(newdr__loop__id==1)%>
            <a href="<%linkurl("news_show",{newdr[id]})%>" data-ignore="true">
              <img src="{newdr[img_url]}" />
              <h2>{newdr[title]}</h2>
              <p class="intro">{newdr[zhaiyao]}</p>
            </a>
            <%else%>
            <a href="<%linkurl("news_show",{newdr[id]})%>" data-ignore="true">
              {newdr[title]}
            </a>
            <%/if%>
          </li>
          <%/loop%>
        </ul>
      </div>
      <!--/新闻资讯-->
      
      <!--图片新闻-->
      <div class="section">
        <h1>图片新闻</h1>
      </div>
      <div>
        <ul class="list listview">
          <%set DataTable picNews=get_article_list(channel, 0, 5, "status=0 and img_url<>''")%>
          <%foreach(DataRow dr in picNews.Rows)%>
          <li>
            <a href="<%linkurl("news_show",{dr[id]})%>" data-ignore="true">
              <img src="{dr[img_url]}" />
              <h2>{dr[title]}</h2>
              <div class="note">
                <p>{dr[zhaiyao]}</p>
                <p><i class="hot">{dr[click]}次</i><i class="date">时间：<%datetostr({dr[add_time]},yyyy-MM-dd)%></i></p>
              </div>
            </a>
          </li>
          <%/foreach%>
        </ul>
      </div>
      <!--/图片新闻-->
      
      <!--人气排行-->
      <div class="section">
        <h1>人气排行</h1>
      </div>
      <div>
        <ul class="list listview">
          <%set DataTable hotNews=get_article_list(channel, 0, 10, "status=0", "click desc")%>
          <%loop hotdr hotNews%>
          <li>
            <a href="<%linkurl("news_show",{hotdr[id]})%>" data-ignore="true">
              <i class="number">{hotdr__loop__id}</i><span class="text">{hotdr[title]}</span>
            </a>
          </li>
          <%/loop%>
        </ul>
      </div>
      <!--人气排行-->
      
      <!--版权信息-->
      <%template src="_copyright.html"%>
      <!--/版权信息-->
    
	</div>
    
    <!--页面头部-->
    <%template src="_header.html"%>
    <!--/页面头部-->
    
    <!--底部导航-->
    <%template src="_footer.html"%>
    <!--/底部导航-->
	
    <!--左侧导航-->
    <%template src="_nav.html"%>
    <!--/左侧导航-->
    
    <!--分类筛选-->
    <div id="categoryPanel" class="panel" data-footer="none">
      <header>
        <a onclick="$.ui.goBack();" class="backButton">返回</a>
        <h1>资讯类别</h1>
        <a onclick="$.ui.toggleSideMenu()" class="menuButton"></a>
      </header>
    
      <ul class="category-bar">
        <!--大类-->
        <%set DataTable category_list1=get_category_child_list(channel, 0)%>
        <%loop cdr1 category_list1%>
        <li>
          <h2><a href="<%linkurl("news_list",{cdr1[id]})%>" data-ignore="true">{cdr1[title]}</a></h2>
          <p>
            <!--小类-->
            <%set DataTable category_list2=get_category_child_list(channel, {strtoint({cdr1[id]})})%>
            <%loop cdr2 category_list2%>
            <a href="<%linkurl("news_list",{cdr2[id]})%>" data-ignore="true">{cdr2[title]}</a>
            <%/loop%>
            <!--/小类-->
          </p>
        </li>
        <%/loop%>
        <!--/大类-->
      </ul>
    </div>
    <!--/分类筛选-->
      
  </div>
</div>
</body>
</html>
